package com.cn.common;

import com.cn.common.processor.INettyRequestProcessor;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutorService;

public class NettyRequestWrapper {

    private static Map<Integer, Pair<INettyRequestProcessor, ExecutorService>> requestTables = new HashMap<>();

    public static void add(int code, Pair<INettyRequestProcessor, ExecutorService> pair) {
        requestTables.put(code, pair);
    }

    public static Pair<INettyRequestProcessor, ExecutorService> get(int code) {
        return requestTables.get(code);
    }

}
